package com.uobgroup.ews.uam.core.dao.ldap;

import com.uobgroup.ews.uam.core.domain.SecurityGroup;
import com.uobgroup.ews.uam.core.model.Group;
import com.uobgroup.ews.uam.core.model.Person;

public interface LDSDao {

   Person findUser(String username);

   Group findGroup(String groupName);
   
   Group findGroupByBaseDN(String groupName, String baseDn);

   String createUser(Person person);

   boolean deleteUser(Person person);

   String createGroup(SecurityGroup group);

   boolean deleteGroup(SecurityGroup group);

   boolean hasGroupByBaseDN(String roleName, String baseDN);

   boolean addAttribute(Person person, String attName, String attValue);

   boolean updateAttribute(Person person, String attName, String attValue);

   boolean hasAttribute(Person person, String attName);
   
   void assignChildGroupToParent(SecurityGroup parent, SecurityGroup child);
   
   void assignUserToProfile(SecurityGroup parent, SecurityGroup child);
   
   void unassignChildGroupFromParent(SecurityGroup parent, SecurityGroup child);
   
   void unassignUserFromProfile(SecurityGroup parent, SecurityGroup child);
}
